# -*- coding: utf-8 -*-
# @Time    : 2019/11/12
# @Author  : CHENlj
# @File    : Consts.py

"""
接口全局变量
"""

# 前台用户登陆后的token
TOKEN_FOREGROUND = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3MGFhYmU0MS04NzlkLTQ4ZDgtYWVlZC1iMDk4N' \
                   'zFiMjdhYWQiLCJpYXQiOjE1NzUyNjg2NzksImV4cCI6MTU3NTI3NTg3OSwibmFtZSI6IjQwOTQ0MTcyMDY0Iiwic2NvcGUi' \
                   'OiJ1c2VyIn0.9dmwk4KZ1HDJYdbkq8SNPPoru54Z5BAI2z8Wh2_pC6g'
# 后台token
TOKEN_BACKGROUND = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI0ODdiMzFiYy1jMDY3LTQ5NjktOGNkYS1lNGJiMj' \
                   'ljNWQ0ZjIiLCJpYXQiOjE1NzUyNjk0ODEsImV4cCI6MTU3NTI3NjY4MSwibmFtZSI6InRlc3QiLCJzY29wZSI6ImFkbWlu' \
                   'In0.sI1QLE1HqwQM4GG8WBWOZq_JXeaiWo4MLf1lhtAMRJE'

# 测试服前台接口请求host
HOST = 'https://apimc1.vuewithreact.xyz/'
# 测试服后台接口请求host
BACKGROUND_HOST = 'https://apimc2.vuewithreact.xyz'

# 用户地址簿
ADDRESS_BOOK = HOST + '/user/address_book'
# 修改密码地址
ADDRESS_PWD = HOST + '/user/password'
# 生成谷歌验证器Secret
GOOGLE_AUTH_CREATE = HOST + '/user/google_auth/create'
# 获取用户的收付款列表
GET_PAYMENTS = HOST + '/user/payments'
# 增、删、改用户的收付款信息
PAYMENT = HOST + 'user/payment'
# 系统支持的收付款列表
PAYMENT_TYPES = HOST + '/payment_types'

# 获取个人积分
INTEGRAL_INFO = HOST + '/integral/info'
# 用户抽奖详情页
LOTTERY_INFO = HOST + '/integral/lottery/info'
# 获取个人抽奖记录
LOTTERY_RECORD = HOST + '/integral/mylottery_record'
# 获取公告连续签到7天以上的记录
SIGN_LAST = HOST + '/integral/sign/last'
# 获取公告用户中奖记录
LOTTERY_LAST = HOST + '/integral/lottery/last'
# 积分账单列表
RECORD_LIST = HOST + '/integral/record/list'
# 用户签到
INTEGRAL_SIGN = HOST + '/integral/sign'
# 积分抽奖
INTEGRAL_LOTTERY = HOST + '/integral/lottery/do'

# 获取前台展示商品列表
COMMODITY_LIST_FORE = HOST + '/commodity/list'
# 获取前台展示商品详情
COMMODITY_INFO_FORE = HOST + '/commodity/info/'
# 获取商品换购记录
EXCHANGE_RECORD = HOST + '/commodity/exchange/record'
# 购买商品
COMMODITY_BUY = HOST + '/commodity/buy/'

# 后台展示商品列表
COMMODITY_LIST_BACK = BACKGROUND_HOST + '/commodity/list'
# 后台获取商品详情
COMMODITY_INFO_BACK = BACKGROUND_HOST + '/commodity/info/'
# 后台获取商品兑换列表
EXCHANGE_LIST_BACK = BACKGROUND_HOST + '/commodity/exchange/list'
# 后台商品兑换列表导出
EXCHANGE_LIST_EXPORT = BACKGROUND_HOST + '/commodity/exchange/list/export'
# 后台添加商品
COMMODITY_ADD = BACKGROUND_HOST + '/commodity/add'
# 后台更新商品
COMMODITY_SET = BACKGROUND_HOST + '/commodity/set'
# 商品上架下架
COMMODITY_STATUS = BACKGROUND_HOST + '/commodity/save/status'  # 1上架  2下架
# 删除商品
COMMODITY_DEL = BACKGROUND_HOST + '/commodity/delete/'

if __name__ == '__main__':
    print(ADDRESS_BOOK)
    print(TOKEN_FOREGROUND)
